import type { Class, subClass } from "@/types/category"
import { http } from "@/utils/https"


//获取分类列表
export const getCategoryAPI = () => {
  return http<Class>({
    method: 'GET',
    url: '/class/getAll'
  })
}

//获取二级分类列表
export const getSubCategoryAPI = async (fatherClass: string) => {
  return http<subClass>({
    method: 'GET',
    url: `/class/next/${fatherClass}`
  })
}
